package com.example.demo.demo.invoke;

import jakarta.annotation.Resource;
import org.springframework.ai.chat.model.ChatModel;
import org.springframework.ai.openai.OpenAiChatModel;
import org.springframework.stereotype.Component;

@Component
public class SpringOpenAi {
    @Resource
    private ChatModel openAiModel;

    public void invoke() {
        String call = openAiModel.call("hello~,你是谁");
        System.out.println(call);
    }


}
